package com.wn32.main.demo18;

import java.util.ArrayList;
import java.util.Random;

public class Main2 {
    public static void main(String[] args) {
        int[] arr=new int[50];
        for (int i = 0; i <50 ; i++) {
            int a = (int) (Math.random() * 300) + 1;
            if(a%2==0){
                arr[i]=a;
            }
        }
        for (int i = 0; i <arr.length ; i++) {
            for (int j = 0; j <arr.length-i; j++) {
                if(arr[j]<arr[j+1]){
                    int t=arr[j];
                    arr[j]=arr[j+1];
                    arr[j+1]=t;
                }
            }
        }
        System.out.println(arr);

    }
}